﻿using CallCenter.Data.Base;
using CallCenter.Data.BizUtilities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CallCenter.Data
{
    public class DataManager
    {
        public DataFactory Factory { get; set; }

        public DataManager(string connectionString)
        {
            this.Factory = new DataFactory(connectionString);
        }

        private MenuUtility _menuUtility;
        public MenuUtility MenuUtility
        {
            get
            {
                this._menuUtility = this._menuUtility ?? new MenuUtility(this);
                return this._menuUtility;
            }
        }

        private SalesLeadUtility _salesUtility;
        public SalesLeadUtility SalesLeadUtility
        {
            get
            {
                this._salesUtility = this._salesUtility ?? new SalesLeadUtility(this);
                return this._salesUtility;
            }
        }


        private VendorUtility _vendorUtility;
        public VendorUtility VendorUtility
        {
            get
            {
                this._vendorUtility = this._vendorUtility ?? new VendorUtility(this);
                return this._vendorUtility;
            }
        }

        private ContactDetailUtility _contactDtUtility;
        public ContactDetailUtility ContactDetailUtility
        {
            get
            {
                this._contactDtUtility = this._contactDtUtility ?? new ContactDetailUtility(this);
                return this._contactDtUtility;
            }
        }


        private InvoiceItemsUtility _invoiceitemsUtility;
        public InvoiceItemsUtility InvoiceItemsUtility
        {
            get
            {
                this._invoiceitemsUtility = this._invoiceitemsUtility ?? new InvoiceItemsUtility(this);
                return this._invoiceitemsUtility;
            }
        }



        private InvoiceUtility _invoiceUtility;
        public InvoiceUtility InvoiceUtility
        {
            get
            {
                this._invoiceUtility = this._invoiceUtility ?? new InvoiceUtility(this);
                return this._invoiceUtility;
            }
        }


        private CompanyOfficeUtility _companyofficeUtility;
        public CompanyOfficeUtility CompanyOfficeUtility
        {
            get
            {
                this._companyofficeUtility = this._companyofficeUtility ?? new CompanyOfficeUtility(this);
                return this._companyofficeUtility;
            }
        }

        private CompanyHistoryUtility _historyUtility;
        public CompanyHistoryUtility CompanyHistoryUtility
        {
            get
            {
                this._historyUtility = this._historyUtility ?? new CompanyHistoryUtility(this);
                return this._historyUtility;
            }
        }



        private ProjectSubTaskUtility _subtaskUtility;
        public ProjectSubTaskUtility ProjectSubTaskUtility
        {
            get
            {
                this._subtaskUtility = this._subtaskUtility ?? new ProjectSubTaskUtility(this);
                return this._subtaskUtility;
            }
        }


        private TaskUtility _taskUtility;
        public TaskUtility TaskUtility
        {
            get
            {
                this._taskUtility = this._taskUtility ?? new TaskUtility(this);
                return this._taskUtility;
            }
        }
        private ServiceContractUtility _serviceContractUtility;
        public ServiceContractUtility ServiceContractUtility
        {
            get
            {
                this._serviceContractUtility = this._serviceContractUtility ?? new ServiceContractUtility(this);
                return this._serviceContractUtility;
            }
        }

        private ProductRequestUtility _productRequestUtility;
        public ProductRequestUtility ProductRequestUtility
        {
            get
            {
                this._productRequestUtility = this._productRequestUtility ?? new ProductRequestUtility(this);
                return this._productRequestUtility;
            }
        }


        private ProdutRequestMemeberUtility _productRequestMUtility;
        public ProdutRequestMemeberUtility ProdutRequestMemeberUtility
        {
            get
            {
                this._productRequestMUtility = this._productRequestMUtility ?? new ProdutRequestMemeberUtility(this);
                return this._productRequestMUtility;
            }
        }


        private BusinessUtility _businessUtility;
        public BusinessUtility BusinessUtility
        {
            get
            {
                this._businessUtility = this._businessUtility ?? new BusinessUtility(this);
                return this._businessUtility;
            }
        }
        private ResourceUtility _resUtility;
        public ResourceUtility ResourceUtility
        {
            get
            {
                this._resUtility = this._resUtility ?? new ResourceUtility(this);
                return this._resUtility;
            }
        }


        private ClientTypeUtility _clientUtility;
        public ClientTypeUtility ClientTypeUtility
        {
            get
            {
                this._clientUtility = this._clientUtility ?? new ClientTypeUtility(this);
                return this._clientUtility;
            }
        }


        private DurationUnitUtility _durationUtility;
        public DurationUnitUtility DurationUnitUtility
        {
            get
            {
                this._durationUtility = this._durationUtility ?? new DurationUnitUtility(this);
                return this._durationUtility;
            }
        }



        private AddressTypeUtility _addUtility;
        public AddressTypeUtility AddressTypeUtility
        {
            get
            {
                this._addUtility = this._addUtility ?? new AddressTypeUtility(this);
                return this._addUtility;
            }
        }

        private DepartmentUtility _deptUtility;
        public DepartmentUtility DepartmentUtility
        {
            get
            {
                this._deptUtility = this._deptUtility ?? new DepartmentUtility(this);
                return this._deptUtility;
            }
        }
        private JobTitleUtility _jobUtility;
        public JobTitleUtility JobTitleUtility
        {
            get
            {
                this._jobUtility = this._jobUtility ?? new JobTitleUtility(this);
                return this._jobUtility;
            }
        }
        private ScratchUtility _scratchUtility;
        public ScratchUtility ScratchUtility
        {
            get
            {
                this._scratchUtility = this._scratchUtility ?? new ScratchUtility(this);
                return this._scratchUtility;
            }
        }
        private ContactTypeUtilitycs _contactTypeUtility;
        public ContactTypeUtilitycs ContactTypeUtilitycs
        {
            get
            {
                this._contactTypeUtility = this._contactTypeUtility ?? new ContactTypeUtilitycs(this);
                return this._contactTypeUtility;
            }
        }

        private AccountUtility _accountUtility;
        public AccountUtility AccountUtility
        {
            get
            {
                this._accountUtility = this._accountUtility ?? new AccountUtility(this);
                return this._accountUtility;
            }
        }


        private RoleUtility _roleUtility;
        public RoleUtility RoleUtility
        {
            get
            {
                this._roleUtility = this._roleUtility ?? new RoleUtility(this);
                return this._roleUtility;
            }
        }

        private RoleUserUtility _roleuserUtility;
        public RoleUserUtility RoleUserUtility
        {
            get
            {
                this._roleuserUtility = this._roleuserUtility ?? new RoleUserUtility(this);
                return this._roleuserUtility;
            }
        }


        private FeatureUtility _featureUtility;
        public FeatureUtility FeatureUtility
        {
            get
            {
                this._featureUtility = this._featureUtility ?? new FeatureUtility(this);
                return this._featureUtility;
            }
        }

        private CommunicationContacts _commContactsUtility;
        public CommunicationContacts CommunicationContacts
        {
            get
            {
                this._commContactsUtility = this._commContactsUtility ?? new CommunicationContacts(this);
                return this._commContactsUtility;
            }
        }


        private CompanyUtility _companyUtility;
        public CompanyUtility CompanyUtility
        {
            get
            {
                this._companyUtility = this._companyUtility ?? new CompanyUtility(this);
                return this._companyUtility;
            }
        }



        private ProductsUtility _productsUtility;
        public ProductsUtility ProductsUtility
        {
            get
            {
                this._productsUtility = this._productsUtility ?? new ProductsUtility(this);
                return this._productsUtility;
            }
        }

        private ccContactUtility _contactsUtility;
        public ccContactUtility ccContactUtility
        {
            get
            {
                this._contactsUtility = this._contactsUtility ?? new ccContactUtility(this);
                return this._contactsUtility;
            }
        }


        private CommunicationUtility _communicationUtility;
        public CommunicationUtility CommunicationUtility
        {
            get
            {
                this._communicationUtility = this._communicationUtility ?? new CommunicationUtility(this);
                return this._communicationUtility;
            }
        }

        private CompanyContactsUtility _companyContactsUtility;
        public CompanyContactsUtility CompanyContactsUtility
        {
            get
            {
                this._companyContactsUtility = this._companyContactsUtility ?? new CompanyContactsUtility(this);
                return this._companyContactsUtility;
            }
        }

        private StatusUtility _statusUtility;
        public StatusUtility StatusUtility
        {
            get
            {
                this._statusUtility = this._statusUtility ?? new StatusUtility(this);
                return this._statusUtility;
            }
        }



        private CommunicationMediumUtility _communicationMediumUtility;
        public CommunicationMediumUtility CommunicationMediumUtility
        {
            get
            {
                this._communicationMediumUtility = this._communicationMediumUtility ?? new CommunicationMediumUtility(this);
                return this._communicationMediumUtility;
            }
        }





        private ccCallHistory _callhistory;
        public ccCallHistory CallHistory
        {
            get
            {
                this._callhistory = this._callhistory ?? new ccCallHistory(this);
                return this._callhistory;
            }
        }

        private ccCallLogs _calllogs;
        public ccCallLogs CallLogs
        {
            get
            {
                this._calllogs = this._calllogs ?? new ccCallLogs(this);
                return this._calllogs;
            }
        }

        private AccountUtility _accounts;
        public AccountUtility Accounts
        {
            get
            {
                this._accounts = this._accounts ?? new AccountUtility(this);
                return this._accounts;
            }
        }

        private RoleUtility _role;
        public RoleUtility Role
        {
            get
            {
                this._role = this._role ?? new RoleUtility(this);
                return this._role;
            }
        }

        private RoleUserUtility _ruserrole;
        public RoleUserUtility RoleUser
        {
            get
            {
                this._ruserrole = this._ruserrole ?? new RoleUserUtility(this);
                return this._ruserrole;
            }
        }

        private CommEmployeeUtility _comEmplyUtly;
        public CommEmployeeUtility CommEmployeeUtility
        {
            get
            {
                this._comEmplyUtly = this._comEmplyUtly ?? new CommEmployeeUtility(this);
                return this._comEmplyUtly;
            }
        }

        private EmployeeUtility _EmplyUtly;
        public EmployeeUtility EmployeeUtility
        {
            get
            {
                this._EmplyUtly = this._EmplyUtly ?? new EmployeeUtility(this);
                return this._EmplyUtly;
            }
        }


    }
}
